package by.alex.dzeshko.facebooksuperclient.utils;

import by.alex.dzeshko.facebooksuperclient.R;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.NotificationManager;
import android.content.Context;
import android.support.v4.app.NotificationCompat;

public class Notifier {

	public static void notifyError(Context context, String message){
		NotificationManager notifyManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
		NotificationCompat.Builder notiBuilder = new NotificationCompat.Builder(context);
		notiBuilder.setContentTitle(context.getString(R.string.error))
					.setContentInfo(context.getString(R.string.error))
					.setTicker(context.getString(R.string.error))
					.setContentText(message)
					.setSmallIcon(android.R.drawable.ic_dialog_alert)
					.setAutoCancel(true);
		notifyManager.notify(25, notiBuilder.build());
		
		/*AlertDialog.Builder builder = new Builder(context);
		builder.setTitle(context.getString(R.string.error))
				.setMessage(message)
				.setPositiveButton(context.getString(android.R.string.ok), null);
		builder.create().show();*/
		
	}
}
